package com.flong.spring.service;

import com.flong.spring.dao.StudentDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.inject.Inject;

/**
 * @Author:liangjl
 * @Date: 2020/6/10-19:13
 * @Eamil:jilongliang@sina.com
 * @Description:
 */
@Service
public class StudentService {


    //@Qualifier("studentDao1")
    //required表示不必须
    //@Autowired(required = false)
    @Inject
    StudentDao studentDao;

    public  void print(){
        System.out.println(studentDao);
    }

    @Override
    public String toString() {
        return "StudentService{" +
                "studentDao=" + studentDao +
                '}';
    }
}
